package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(50)"`
}

type Video struct {
	gorm.Model
	Title     string `gorm:"type:varchar(50)"`
	Content   string `gorm:"type:varchar(50)"`
	Img       string `gorm:"type:varchar(255)"`
	LikeCount int    `gorm:"type:int"`
}

type Like struct {
	gorm.Model
	UserID  int   `gorm:"type:int"json:"user_id"`
	User    User  `gorm:"foreignKey:UserID"json:"user"`
	VideoID int   `gorm:"type:int"json:"video_id"`
	Video   Video `gorm:"foreignKey:VideoID"json:"video"`
}
